<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="thx" uri="/thx-tags"%>
<style>
.form-horizontal .form-group {
	margin-right: 0px;
	margin-left: 0px;
}
</style>


<form id="user-form" name="ui-adminlte-form" class="form-horizontal"
	data-toggle="validator" role="form" method="post"
	container = "div.right"
	action="${pageContext.request.contextPath}/addressbook/addressbook!save.action"
	forward-action="${pageContext.request.contextPath}/addressbook/addressbook!list.action?pid=${pid}">
	<s:token></s:token>
	<input type="hidden" name="id" value="${entity.priId}"/>
	<input type="hidden" name="message" value="${message}" />
	<input type="hidden" name='pid' value="${pid}">
	<input type="hidden" name='entity.priId' value="${entity.priId}">
	
	<div id="commons">
		<div class="row">
            <div class="col-md-6">
                <div class="form-group">
                 	<label>联系人</label> 
					<input type="text" name="entity.addressbookName"class="form-control required" placeholder="请输入联系人" value="${entity.addressbookName}">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                 	<label>所属组</label> 
					<input type="text" name="" class="form-control" readonly="true" value="${group.agName}">
					<input type="hidden" name="entity.agId" value="${pid}">
                </div>
            </div>
        </div>
		<div class="row">
            <div class="col-md-6">
                <div class="form-group">
	                 <label>邮箱地址</label> 
					 <input type="text" name="entity.addressbookMail" class="form-control required" placeholder="请输入邮箱地址" value="${entity.addressbookMail}">
                </div>
            </div>
            <div class="col-md-6">
                <div>
 					<label>性别</label>
                    <label for="sex[1]">男</label>
                    <input type="radio" name="entity.addressbookSex" id="sex[1]" value="1" <c:if test="${entity.addressbookSex=='1'}">checked</c:if>/>
                    <label for="sex[0]">女</label>
                    <input type="radio" name="entity.addressbookSex" id="sex[0]" value="0" <c:if test="${entity.addressbookSex=='0'}">checked</c:if>/>                
                </div>
            </div>
        </div>        
		<div class="row">
            <div class="col-md-6">
                <div class="form-group">
	              	<label>公司电话</label> 
					<input type="text" name="entity.addressbookPhone"class="form-control" placeholder="(选填)" value="${entity.addressbookPhone}">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                 	<label>联系电话</label> 
					<input type="text" name="entity.addressbookMobile"class="form-control required" placeholder="请输入联系电话" value="${entity.addressbookMobile}">
                </div>
            </div>
        </div>        
		<div class="row">
            <div class="col-md-6">
                <div class="form-group">
	              	<label>职务</label> 
					<input type="text" name="entity.addressbookDuty"class="form-control" placeholder="(选填)" value="${entity.addressbookDuty}">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                 	<label>小号</label> 
					<input type="text" name="entity.addressbookShortmobile"class="form-control" placeholder="(选填)" value="${entity.addressbookShortmobile}">
                </div>
            </div>
        </div>        
		
		<div class="form-group">
			<label>工作单位</label> 
			<input type="text" name="entity.addressbookCompany"class="form-control" placeholder="(选填)" value="${entity.addressbookCompany}">
		</div>
		<div class="form-group">
			<label>住宅地址</label> 
			<input type="text" name="entity.addressbookLocation"class="form-control" placeholder="(选填)" value="${entity.addressbookLocation}">
		</div>
		<div class="form-group">
			<label>备注</label> 
			<input type="text" name="entity.addressbookRemark"class="form-control" placeholder="(选填)" value="${entity.addressbookRemark}">
		</div>        	
	</div>	
</form>

<script>
require(['form' ], function(form) {
	form.init();
	var message='${message}';
	var userId ='${entity.priId}';
});
</script>

